Until(((((K$>="a") and(K$<="z")) or((K$>="A") and(K$<="Z")) or((K$>="0") and(K$<="9")) or((K$=" ") and(NAME$<>""))) and Len(NAME$)<14) or((K$=Chr$(13)) and(NAME$-" "<>"")) or K=$45 or((K=$41) and(NAME$<>"")))
370
If K=$45
Fade PAWS
Wait PAWS*16
Goto CONTROL_SCREEN
Else
If K=$41
NAME$=Left$(NAME$,Len(NAME$)-1)
Goto ENTER_NAME
Else
If K$=Chr$(13)
Locate 0,22 : Print Space$(40)
Else
NAME$=NAME$+K$
Goto ENTER_NAME
End If
End If
End If
380
REDO:
Pen 3
Locate 0,21
Print "Okay ";NAME$;", what size of words"
Print "do you want to try? (5 to 9 letters)";
Pen 1
If WRDSZE>0 Then Print WRDSZE;"_" Else Print " _ "
Clear Key
Repeat
K$=Inkey$
K=Scancode
Until((K$>="5") and(K$<="9")) or K=65 or K=69 or((K$=Chr$(13)) and WRDSZE<>0)
If K=$45
Fade PAWS
Wait PAWS*16
Goto CONTROL_SCREEN
Else
If K=$41
WRDSZE=0
Goto 380
Else
If((K$>="5") and(K$<="9"))
WRDSZE=Val(K$)
Goto 380
Else
If K$<>Chr$(13)
Goto 380
End If
End If
End If
End If
Locate 0,21
Print Space$(119)
Locate 0,22
If WRDSZE<>6 Then DEMO_MESSAGE["Selecting a word length","This demo version is set up so that","you can only work with 6 letter","words. The full version enables you","to use all 5 lengths."] : Goto REDO
Centre "Loading Words - Please Wait"
Gosub RETRIEVE_WORDS
Gosub RETRIEVE_MAGIC_WORDS
Fade PAWS
Wait PAWS*16
Paper 0
Clw
ITEM$(1)="Flash "
ITEM$(2)="Complete "
ITEM$(3)="Crack-It "
ITEM$(4)="Hang-Up "
ITEM$(5)="Jumbles "
HIPOS=-1
CLOK=0
OLD_TIME=0
Timer=0
HOUR=0
MI=0
EL_TIME=0
HOUR$="00"
MI$="00"
EL_TIME$="00"
MAGICW$=""
T=Rnd(4)
For I=1 To 5
MAGICW$=MAGICW$+Mid$(MAGWRD$(T),I,1)
COMPLETED(I)=0
Next I
If SECTION<>0
For I=1 To 5
ITEM$(I)=Left$(ITEM$(SECTION),9)+Str$(I)-" "
Next I
End If
MAGICL$=Space$(5)
MAGICA$=""
For I=1 To 5
MAGICA$=MAGICA$+Mid$(MAGICW$,I,1)
Next I
Gosub JUMBLE_MAGIC_WORD
For G=1 To 5
For Q=0 To 7
ANOTHER_WORD:
A$=WRD$(Rnd(T0TWRD))
For QQ=0 To 7
If QUESTION$(G,QQ)=A$ Then Goto ANOTHER_WORD Else Next QQ
Print Space$(41);"Do you really want to escape? (Y or N)";Space$(41)
Ink 15
Box 2,178 To 317,197
Clear Key
Repeat
K$=Lower$(Inkey$)
Until((K$="y") or(K$="n"))
Timer=CLOK
Put Cblock 1,0,174
Screen Swap
Put Cblock 1,0,174
Del Cblock 1
If K$="n" Then K$="" : Return
If BOOK=False
Fade PAWS
Wait PAWS*16
Bob Off
Wait Vbl
Pen 15
Paper 0
Clw
Pop : Pop
WRD=1
Goto SELECT_GAME
Else
DEMO_MESSAGE["Saving Results","The demo version does not keep track","of the progress of each student. The","full version records results so that","they can be viewed later."]
Screen Close 1 : CLEAR_BANKS : Run "outro.amos"
End If
Fade PAWS
Wait PAWS*16
Bob Off
Wait Vbl
Pen 15
Paper 0
Clw
Pop
WRD=1
Goto GAME_INSTRUCTIONS
CHECK_ANSWER:
If ANSWER$<>WD$ and GAME<>4
Inc COUNT
Gosub DULL_THUD
End If
If WD$=ANSWER$
If WRD(OPT)<9
On GAME Gosub GAME1_CORRECT,GAME2_CORRECT,GAME3_CORRECT,GAME4_CORRECT,GAME5_CORRECT
Else
On GAME Gosub GAME1_CORRECT,GAME2_CORRECT,GAME3_CORRECT,GAME4_CORRECT,GAME5_CORRECT
End If
End If
If COUNT>=3
OLD_TIME=Timer
COUNT=0
If WRD(OPT)<9
On GAME Gosub GAME1_WRONG,GAME2_WRONG,GAME3_WRONG,GAME4_WRONG,GAME5_WRONG
Else
On GAME Gosub GAME1_WRONG,GAME2_WRONG,GAME3_WRONG,GAME4_WRONG,GAME5_WRONG
End If
End If
Y_TEXT=Y_TEXT-(Y_TEXT=19)
Locate X_TEXT,Y_TEXT : Print Space$(10)
Locate X_TEXT,Y_TEXT
Return
WORD_FLASH:
Pen 15
Paper 0
Locate X_TEXT,Y_TEXT
Print WD$
Pen 6
Paper 12
If GAME=1 Then Locate 1,23 : Centre " Here is the word "
If ADTIME=1
Gosub CLUE_PENALTY
Else
TEMP=Timer
Clear Key
Repeat
K$=Lower$(Inkey$) : K=Scancode
Until(Timer>TEMP+200 or((K$>="a") and(K$<="z")))
Timer=TEMP
End If
Pen 15
Paper 0
Locate X_TEXT,Y_TEXT
Print Space$(WRDSZE+2)
Pen 6
Paper 12
If GAME=1 Then Locate 1,23 : Centre " Type in the word "
Pen 15
Paper 0
Locate X_TEXT,Y_TEXT
SHWRD=True
ADTIME=0
Return
GAME1_WRONG:
If LEVEL=0
SPEED=130
X$="-48"
STP$="120"
Else
If LEVEL=1
SPEED=190
X$="-64"
STP$="160"
Else
If LEVEL=2
SPEED=270
STP$="240"
X$="-96"
End If
End If
End If
Amal 4,"Anim 1,(44,14)(46,14)(48,14)(50,14)(52,14)(54,14)(56,14)"
Amal On 4
Gosub 2710
Amal 4,"Anim 1,(56,14)(54,14)(52,14)(50,14)(48,14)(46,14)(44,14)(28,1)"
Amal On 4
Gosub 2720
Amal 4,"Anim 0,(29,13)(30,13)(32,13)(34,13)(36,13);Move "+X$+",0,"+STP$
DEMO_MESSAGE["Saving Results","The demo version does not keep a track","of the progress of each student. The","full version records results so that","they can be viewed later."]
Screen Close 1 : CLEAR_BANKS : Run "outro.amos"
End If
Goto GAME_INSTRUCTIONS
BACK_TO_BOOK:
Paper 0
Clw
GAME_END=False
Goto SELECT_GAME
INSERT_SCORE:
HIPOS=-1
For I=0 To 9
If GAMETIME$>HTIME$(I)
Next I
Else
For Y=8 To I Step -1
HTIME$(Y+1)=HTIME$(Y)
HNAME$(Y+1)=HNAME$(Y)
Next Y
HTIME$(I)=GAMETIME$
HNAME$(I)=NAME$
HIPOS=I
End If
Return
TRANSFORM_HENRY:
Fade PAWS
Wait PAWS*16
Screen 1
Paper 0
Clw
Wind Open 2,0,0,40,12
Curs Off
Scroll Off
Ink 2
Box 0,0 To 319,199
Box 1,1 To 318,198
Set Font FONT_NUMBER
Ink 1,0
Text 56,16,"Well done, "+NAME$+"!"
Text 56,32,"You have found the five"
Text 56,48,"magic letters. To restore"
Text 56,64,"Henry to his former, good-"
Text 56,5*16,"looking self, arrange them"
Text 56,6*16,"to make the name of"
Text 56,7*16,"something found in"
Text 56,8*16,"Morgana's garden."
Ink 3,0
W=Text Length("Press <Space> to continue")
Text 160-W/2,11*16,"Press <Space> to continue"
Fade PAWS,$8,$CC0,$C0,$C00
Wait PAWS*16
Clear Key
Repeat : Until Inkey$=" "
Fade PAWS
Wait PAWS*16
Wind Close
Pen 15
Clw
If LMEM=False
On Error Goto DISK_READ_ERROR_LOWRES
Load "data/spell5.abk"
On Error Goto BBER
End If
Unpack 5 To 1
Flash Off
Curs Off
Scroll Off
Ink 1
Bar 176,0 To 272,26
Bar 272,0 To 274,25
Pen 6
Paper 12
Locate 0,23 : Centre "Type in the word"
Paste Bob 11*16,100,2
Bob 15,21,0,96
Amal 15,"Anim 0,(96,5)(97,5)(98,5)(99,5)(100,5)(101,5)"
DEMO_MESSAGE["Error Occured","An error from which the DEMO cannot","recover has occured. The error was","number"+Str$(Errn)+". Press any key to return","to the Workbench."]